package linkedlistdemo;

public class Test {
    public static void main(String[] args) {
        MySingleList mySingleList = new MySingleList();
        mySingleList.createList();
        mySingleList.show();//11 23 56 42
        System.out.println(mySingleList.size());//4
        System.out.println(mySingleList.contains(100));//false
        System.out.println(mySingleList.contains(23));//true
        mySingleList.headAdd(11);
        mySingleList.headAdd(2);
        mySingleList.headAdd(11);
        mySingleList.show();//11 2 11 11 23 56 42
//        mySingleList.endAdd(7);
//        mySingleList.endAdd(8);
//        mySingleList.endAdd(9);
//        mySingleList.show();//3 2 1 11 23 56 42 7 8 9
//        mySingleList.addIndex(4,22);//3 2 1 11 22 23 56 42 7 8 9
//        mySingleList.addIndex(0,999);
//        mySingleList.addIndex(11,999);
//        mySingleList.show();
        System.out.println("=====================");
        mySingleList.remove(42);
        mySingleList.show();
        System.out.println("=====================");
        mySingleList.endAdd(11);
        mySingleList.show();
        System.out.println("=====================");
        mySingleList.removeAll(11);
        mySingleList.show();
        System.out.println("=====================");
        mySingleList.clear();
        mySingleList.show();
    }
}
